import http from "../https";
const baseURL = 'http://82.157.143.31:8080'

//供应商数据初始化
const SupplierRequest = (page) => http({
    url: `${baseURL}/supplierMng/selectSuppelier`,
    method: 'get',
    params: page
})
const QueryType = () => http({
    url: `${baseURL}/supplierMng/selectTypes`,
    method: 'get'
})
const QueryState = () => http({
    url: `${baseURL}/supplierMng/selectStatus`,
    method: 'get'
})
const QueryRank = () => http({
    url: `${baseURL}/supplierMng/selectLevel`,
    method: 'get'
})
//保存新增请求
const SaveNew = (page) => http({
    url: `${baseURL}/supplierMng/addSuppelier`,
    method: 'post',
    data: page
})
//修改请求
const amends = (page) => http({
    url: `${baseURL}/supplierMng/updateSuppelier`,
    method: 'post',
    data: page
})
//删除供应商
const deletes = (page) => http({
    url: `${baseURL}/supplierMng/deleteSuppelier`,
    method: 'post',
    data: page
})
//转交供应商
const forwards = (page) => http({
    url: `${baseURL}/supplierMng/updateSuppelierByEmployee`,
    method: 'post',
    data: page
})
//查询部门
const department = (page) => http({
    url: `${baseURL}/supplierMng/selectDept`,
    method: 'get',
    // data: page
})
//查询员工
const staffRequest = (page) => http({
    url: `${baseURL}/supplierMng/selectEmployee`,
    method: 'get',
    params: page
})
export { SupplierRequest, QueryType, QueryState, QueryRank, SaveNew, amends, deletes, forwards, department, staffRequest }